<?php extract ( $_GET );

	include 'wp-includes/php/DBManager.class.php';
	
	$query = "Location: infoFilm.php?id=".$f;
	$db = new DBManager ( 'localhost', 'root', '', 'iumus' );
	
	if ( isset ( $u ) && strlen ( $u ) > 0 && $u != "noSet" ) {
		$query = "INSERT INTO  `iumus`.`commenti` ( `idUser`, `idFilm`, `commento` ) VALUES ( '".$u."',  '".$f."',  '".$commentTextArea."' )";
		$db->executeQuery ( $query );
		echo '<script type="text/javascript">alert("Thanks for your comment");location.href = "infoFilm.php?id='.$f.'";</script>';
	} else { 
		if ( strlen ( $u ) == 0 || $u == "noSet" ) 
			echo '<script type="text/javascript">alert ("You must sign up for add a comment!"); location.href = "infoFilm.php?id='.$f.'";</script>';
	}

?>